package cn.topevery.garden.entity.enums;

public enum PlaneExmainState {
    toVoid("作废", -1),
    notSubmitted("未提交", 0),
    toBeReviewed("已提交", 1),
    Pass("审核通过", 2),
    NoPass("审核失败", 3),
    executing("执行中", 4),
    Over("已结束", 5),
    NoReported("未上报", 6),
    Reported("已上报", 7),
    Reject("主管驳回", 8),
    Acceptance("主管已验收", 9),
    AuditReject("审核驳回", 10),
    Undone("审核未完成", 11),
    Consent("同意执行", 12),
    notVerified("未核实", 13),
    complete("完成", 15),
    back("回退", 16),
    FinallySuccess("审核通过", 17);

    public String getLabel() {
        return label;
    }

    public int getIndex() {
        return index;
    }

    private String label;
    private Integer index;

    //构造方法
    PlaneExmainState(String label, int index) {
        this.label = label;
        this.index = index;
    }

    public static String getLabelByIndex(int index) {
        String label = null;
        for (PlaneExmainState type : PlaneExmainState.values()) {
            if (type.getIndex() == index) {
                label = type.getLabel();
                break;
            }
        }
        return label;
    }
}
